From: Jan D. Date: Sun, 31 Oct 2010 16:03:11 +0000 (+0100) Subject: Don't use STRING as first choice when pasting PRIMARY (Bug#6802). X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5878 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=bbefe0f17ca7eaead750f690ef06baf38770e119;p=emacs.git Don't use STRING as first choice when pasting PRIMARY (Bug#6802). * lisp/term/x-win.el (x-get-selection-value): New function that gets PRIMARY with type as specified in x-select-request-type. (Bug#6802). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05ce0d70188..c88985242c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-31 Jan Djärv + + * term/x-win.el (x-get-selection-value): New function that gets + PRIMARY with type as specified in x-select-request-type. (Bug#6802). + 2010-10-31 Michael Albinus * net/tramp.el (tramp-handle-insert-file-contents): For root, diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index bd426012532..afb706ab972 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1279,6 +1279,13 @@ The value nil is the same as this list: (setq interprogram-cut-function 'x-select-text) (setq interprogram-paste-function 'x-selection-value) +;; Make paste from other applications use the decoding in x-select-request-type +;; and not just STRING. +(defun x-get-selection-value () + "Get the current value of the PRIMARY selection. +Request data types in the order specified by `x-select-request-type'." + (x-selection-value-internal 'PRIMARY)) + (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." (interactive "*")